home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / DATABASE.DIR / 00093_Script_SET TEXT ATTRIBUTES < prev    next >
Text File  |  1996-03-28  |  4KB  |  133 lines

  1. -- --------------------------------------------------------------
  2. -- Handler setTextLineHeight
  3.  
  4. on setTextLineHeight
  5.   global textLineHeight
  6.   
  7.   if (the machineType = 256) then -- PC
  8.     set textLineHeight = 15
  9.   else -- MAC
  10.     set textLineHeight = 15
  11.   end if
  12. end
  13.  
  14. -- --------------------------------------------------------------
  15. -- Handler setBrowserLineHeight
  16.  
  17. on setBrowserLineHeight
  18.   global browserLineHeight
  19.   
  20.   if (the machineType = 256) then -- PC
  21.     set browserLineHeight = 18
  22.   else -- MAC
  23.     set browserLineHeight = 17
  24.   end if
  25. end
  26.  
  27. -- --------------------------------------------------------------
  28. -- Handler setFieldFont
  29.  
  30. on setFieldFont whichField
  31.   if (the machineType = 256) then -- PC
  32.     set the textFont of cast whichField = "Times"
  33.   else -- MAC
  34.     set the textFont of cast whichField = "Palatino"
  35.   end if
  36. end
  37.  
  38. -- --------------------------------------------------------------
  39. -- Handler setBrowserAttributes
  40.  
  41. on setBrowserAttributes
  42.   global browserLineHeight, bkgndColor, textColor
  43.   
  44.   setFieldFont("browser")
  45.   set the textHeight of cast "browser" = browserLineHeight
  46.   set the textSize of field "browser" = 12
  47.   -- set the backcolor of cast "browser" = bkgndColor -- Commented out by ET because setting color of field when monitor is in thousands gives wrong color.
  48.   -- set the forecolor of cast "browser" = textColor   
  49. end  
  50.  
  51. -- --------------------------------------------------------------
  52. -- Handler setTitleAttributes
  53.  
  54. on setTitleAttributes
  55.   set the textSize of field "Topic Title" = 15
  56.   set the textStyle of field "Topic Title" = "bold"
  57.   setFieldFont("Topic Title")
  58. end
  59.  
  60. -- --------------------------------------------------------------
  61. -- Handler setTopicTextAttributes sets the text attributes of the
  62. -- field with the given number. (instead of a name, so the lookup
  63. -- is MUCH MUCH faster!)
  64.  
  65. -- The handler was commented out. Uncommented by Ephraim Feb 20 96
  66.  
  67. on setTopicTextAttributes fieldNum
  68.   global clickedTopic, textColor, bkgndColor, textLineHeight
  69.   
  70.   -- set the backColor of cast fieldNum = bkgndColor
  71.   -- set the forecolor of cast fieldNum = textColor -- disabled to allow hypermedia links
  72.   setFieldFont(fieldNum)
  73.   set the textHeight of cast fieldNum = textLineHeight
  74. end
  75.  
  76. -- --------------------------------------------------------------
  77. -- Handler setHilitTopicAttributes
  78.  
  79. on setHilitTopicAttributes
  80.   global hilitBackground, hilitForeground
  81.   
  82.   setFieldFont("hilitTopic")
  83.   set the textHeight of cast "hilitTopic" = the textHeight of cast "browser"
  84.   set the textSize of field "hilitTopic" = the textSize of field "browser"
  85.   -- set the backColor of cast "hilitTopic" = hilitBackground
  86.   -- set the foreColor of cast "hilitTopic" = hilitForeground
  87.   set the textStyle of cast "hilitTopic" = "bold"
  88. end
  89.  
  90. -- --------------------------------------------------------------
  91. -- Handler setCaptionAttributes
  92.  
  93. on setCaptionAttributes captionCast
  94.   -- set the forecolor of cast captionCast to 255 -- black
  95.   -- set the backcolor of cast captionCast to 246 -- grey
  96.   set the textHeight of cast captionCast to 14
  97.   set the textSize of cast captionCast to 12
  98.   set the textFont of cast captionCast to "palatino"
  99. end
  100.  
  101. -- --------------------------------------------------------------
  102. -- Handler setBGColor sets the background color of the given casts
  103. -- to the given color.
  104.  
  105. on setBGColor firstdataCast, lastDataCast, whichColor
  106.   repeat with c = firstDataCast to lastDataCast
  107.     set the backColor of cast c to whichColor
  108.   end repeat
  109. end
  110.  
  111. -- --------------------------------------------------------------
  112. -- Handler setFGColor sets the foreColor of the given casts
  113. -- to the given color.
  114.  
  115. on setFGColor firstdataCast, lastDataCast, whichColor
  116.   repeat with c = firstDataCast to lastDataCast
  117.     set the foreColor of cast c to whichColor
  118.   end repeat
  119. end 
  120.  
  121. -- --------------------------------------------------------------
  122. -- Handler setTitles puts the names of all casts between firstCast
  123. -- and lastCast in the given targetCast.
  124.  
  125. on setTitles firstCast, lastCast, targetCast
  126.   repeat with i = firstCast to lastCast
  127.     put the name of cast i after field targetCast
  128.     put RETURN after field targetCast
  129.   end repeat
  130. end
  131.  
  132.  
  133.